Last active
August 23, 2016 11:16
-
-
Save matsumotory/de371ba5481a6f0af719f2a2f2a4ce56 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./bin/mirb | |
mirb - Embeddable Interactive Ruby Shell | |
> Etcd::hoge | |
/Users/matsumotory/DEV/mruby/build/mrbgems/mruby-etcd/mrblib/etcd.rb:4: undefined method 'aaa' for Etcd (NoMethodError) | |
> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat build/mrbgems/mruby-etcd/mrblib/etcd.rb | |
module Etcd | |
class << self | |
def hoge | |
aaa << 1 | |
end | |
def endpoint | |
@endpoint ||= "http://127.0.0.1:2379/v2" | |
end | |
def endpoint=(url) | |
@endpoint = url | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MRuby::Build.new do |conf| | |
# load specific toolchain settings | |
# Gets set by the VS command prompts. | |
if ENV['VisualStudioVersion'] || ENV['VSINSTALLDIR'] | |
toolchain :visualcpp | |
else | |
toolchain :gcc | |
end | |
enable_debug | |
conf.gem :github => 'udzura/mruby-etcd' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment